package Other;

import java.util.Scanner;

public class Test {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = Integer.parseInt(scanner.nextLine());
        int[] t = new int[n];
        int[] h = new int[n];
        int[] d = new int[n];
        int[] res = new int[n];
        for (int i = 0; i < n; i++) {
            String[] s = scanner.nextLine().split(" ");
            t[i] = Integer.parseInt(s[0]);
            h[i] = Integer.parseInt(s[1]);
            d[i] = Integer.parseInt(s[2]);
        }
        for (int i = 0; i < n; i++) {
            int num = canSee(i,t,h,d);
            System.out.print(num + " ");
        }
    }

    static class Kid {
        int index;
        int left;
        int right;
    }


    public static Kid seekRightAndLeft(int i,int[] h) {
        Kid kid = new Kid();
        kid.index = i;
        for (int j = i - 1; j >= 0; j--) {
            if (h[j] >= h[i]) {
                kid.left = j == 0 ? -1 : j;
                break;
            }
        }
        for (int j = kid.index + 1; j < h.length; j++) {
            if (h[j] >= h[kid.index]) {
                kid.right = j == h.length - 1 ? h.length : j;
                break;
            }
        }
        return kid;
    }

    public static int canSee(int i, int[] t, int[] h, int[] d) {
        int num = 0;
        for (int j = 0; j < t.length; j++) {
            Kid kidJ ;
            int range1 = t[i] - d[i];
            int range2 = t[i] + d[i];
            kidJ = seekRightAndLeft(j, h);
            if (i >= kidJ.left && i <= kidJ.right) {
                if (t[j] >= range1 && t[j] <= range2) {
                    num++;
                }
            }
        }
        return num;


    }
}